#!/bin/bash
# Origin: https://hub.docker.com/r/netdata/netdata
# SPDX-License-Identifier: GPL-3.0+

. $CCI_SRC/container/defconfig.sh

load_cci_defaults

docker_rm netdata

cmd=(
	docker run -d
	--restart=always
	--name netdata
	-p ${NETDATA_PORT:=20013}:19999
	-v /proc:/host/proc:ro
	-v /sys:/host/sys:ro
	-v /etc/localtime:/etc/localtime:ro
	-v /var/run/docker.sock:/var/run/docker.sock:ro
	-v /srv/cache/netdata_cache:/var/cache/netdata
	-v /srv/cache/netdata_lib:/var/lib/netdata
	--log-driver json-file
	--log-opt max-size=1g
	--cap-add SYS_PTRACE
	--security-opt apparmor=unconfined
	netdata/netdatalkp
)
"${cmd[@]}"
